<?php namespace Common\Model;
use Hdphp\Model\Model;
class Presonal extends Model{
	//指定表名
	protected $table='user';
	//自动验证
	protected $validate=[
		['nickname','required','请填写您的昵称',3,3]
	];
	public function edit(){
		if(!$this->create()) return FALSE;
		$_SESSION['nickuser']['nickname']=Q('post.nickname');
		$_SESSION['nickuser']['photo']=Q('post.photo');
		$_SESSION['nickuser']['personalized']=Q('post.personalized');
		return $this->save();
	}
}
 ?>